//
//  VideoTableViewCell.m
//  HumorousSript
//
//  Created by 孟令博 on 15/6/17.
//  Copyright (c) 2015年 李欢. All rights reserved.
//

#import "VideoTableViewCell.h"
#import <MediaPlayer/MediaPlayer.h>
#define Width [UIScreen mainScreen].bounds.size.width
#define Height [UIScreen mainScreen].bounds.size.height

@interface VideoTableViewCell ()<UIWebViewDelegate>



@end

@implementation VideoTableViewCell
- (instancetype)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reuseIdentifier
{
    self = [super initWithStyle:style reuseIdentifier:reuseIdentifier];
    if (self) {
        
        self.imageview = [[UIImageView alloc]initWithFrame:CGRectMake(10/375.0*Width, 10/667.0*Height, 40/375.0*Width, 40/667.0*Height)];
        //        图片变成圆角
        self.imageview.layer.cornerRadius = 20;
        self.imageview.clipsToBounds = YES;
        //        名字
        self.alabel = [[UILabel alloc]initWithFrame:CGRectMake(60/375.0*Width, 10/667.0*Height, 300/375.0*Width, 30/667.0*Height)];
        //        文字
        self.wordsLabel = [[UILabel alloc]initWithFrame:CGRectMake(20/375.0*Width, 50/667.0*Height, 300/375.0*Width, 30/667.0*Height)];
        //        图片
        self.picView = [[UIImageView alloc]initWithFrame:CGRectMake(10/375.0*Width, 100/667.0*Height, 300/375.0*Width, 200/667.0*Height)];
        
        UIImage * im = [UIImage imageNamed:@"v1.jpg"];
        [self.picView setImage:im];
        [self.picView setBackgroundColor:[UIColor grayColor]];
        
        [self.contentView addSubview:self.imageview];
        [self.contentView addSubview:self.alabel];
        [self.contentView addSubview:self.wordsLabel];
        [self.contentView addSubview:self.picView];
        
    }
    return self;
}


- (void)setAlabelFrame
{
    [self.picView setFrame: CGRectMake(10/375.0*Width, 100/667.0*Height, [UIScreen mainScreen].bounds.size.width - 20/375.0*Width, 200/667.0*Height)];

}

- (void)awakeFromNib {
    // Initialization code
}

- (void)setSelected:(BOOL)selected animated:(BOOL)animated {
    [super setSelected:selected animated:animated];

    // Configure the view for the selected state
}

@end
